package com.fh.shop.mapper;/**
 * 描述:
 * Author:袁亚强
 * Date:2021/12/98:52
 */


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fh.shop.entity.po.ShopBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * created by macro on 2021/12/9,
 */
@Mapper
public interface ShopMapper extends BaseMapper<ShopBean> {
    @Select("SELECT s.name as shopName,s.title as intro,s.count as remarks,s.price,s.img,s.typeId FROM t_shop s where s.isdel=0 ")
    List<ShopBean> qeury();

    @Select("SELECT b.`value` FROM t_shop_key a LEFT JOIN t_shop_value b ON a.id=b.aid WHERE a.nameID=#{k} and b.valueId=#{v}")
    String queryName(@Param("k") String k, @Param("v") String v);

    @Select("select name from t_shop_key where nameID=#{k}")
    String queryKeyName(String k);
}
